body {
    font-family: 'Montserrat', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #d7d7d7;
}

.home-icon-container {
    position: absolute;
    top: 10px;
    width: 90%;
    text-align: center;
}

.home-icon {
    cursor: pointer;
    font-size: 1.2em;
    border: 1px solid #555;
    background-color: #2c2c2c;
    padding: 4px 6px;
    border-radius: 4px;
    display: inline-block;
    color: white;
}

.home-icon:hover {
    background-color: #4477aa;
    color: white;
}

nav {
    background-color: #333;
    height: 100vh; /* Full height of the viewport */
    position: fixed;
    left: 0;
    top: 0; /* Start from the very top of the page */
    width: 225px;
    overflow-y: scroll;
    padding: 10px;
    padding-top: 48px; /* Space to move sections below the Home button */
    box-sizing: border-box;
    scrollbar-width: none;
    position: relative;
}

.github-link {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    text-align: center;
}

nav::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome, Safari, and Opera */
}

nav .tech-section, nav .section {
    border: 1px solid #555;
    background-color: #2c2c2c;
    padding: 8px;
    margin-top: 10px;
    border-radius: 4px;
}

h2 {
    text-align: center;
}

nav h3 {
    color: #fff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
}

.tool-category h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #444;
    text-align: left;
    font-size: 1.5em;
    border-bottom: 2px solid #336699;
    padding-bottom: 5px;
}

.toggle-symbol {
    font-size: 1.2em;
    margin-left: 10px;
}

.tech-section, .section-content {
    display: block;
    margin-top: 10px;
}

nav button {
    height: 30px; /* Set button height to 30px for left navigation buttons only */
}

/* 1. NAV sidebar version (short, clipped height) */
nav .wrapped-button {
    height: 30px;
    line-height: 14px;
    overflow: hidden;
    white-space: normal;
    padding-top: 2px;
    padding-bottom: 0; /* prevents visual clipping on second line */
    font-size: 0.85em;
}

/* 2. MAIN content version (auto-resizing height) */
main .wrapped-button {
    white-space: normal;
    line-height: 1.2em;
    padding: 8px 6px;
    min-height: 48px;
    height: auto;
    overflow: visible;
    font-size: 1em;
}

.wrapped-button .subtext {
    display: block;
    font-size: 0.7em;
    opacity: 0.8;
}


button {
    display: block;
    width: calc(100% - 8px);
    margin: 5px auto;
    padding: 5px 6px;
    background-color: #336699;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    text-align: left;
    position: relative;
}

button:hover {
    background-color: #4477aa;
}

.new-tab-icon {
    font-size: 0.9em;
    margin-left: 5px;
    vertical-align: middle;
}

main {
    position: fixed;
    left: 225px;
    top: 0px;
    right: 0;
    bottom: 0;
    overflow: hidden;
    box-sizing: border-box;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
}

#landing-page {
    padding: 20px;
    height: calc(100vh - 50px); /* Adjust height to fill the remaining space */
    overflow-y: auto; /* Enable scrolling within the landing page */
    box-sizing: border-box;
    scrollbar-width: none;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 1px;
}

.tool-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.tool-preview {
    width: 400%;
    height: 600px;
    border: 0px solid #ccc;
    margin-top: 0px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transform: scale(0.25);
    transform-origin: top left;
    margin-right: -300%;
    margin-bottom: -450px;
    pointer-events: auto; /* Allow click interactions */
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    background: transparent;
    z-index: 10; /* Ensure the overlay is above the iframe */
}

.tool-tile {
    background-color: #336699;
    color: #fff;
    padding: 20px;
    text-align: center;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    width: 100%;
}

.tool-tile:hover {
    background-color: #4477aa;
    transform: translateY(-5px);
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 10px;
}

@media (max-width: 768px) {
    /* Hide the navigation on small screens */
    nav {
        display: none;
    }

    /* Adjust the main content to take up the full width */
    main {
        left: 0;
    }

    /* Display the grid in 2 columns on smaller screens */
    .tool-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Hide the footer on small screens */
    footer {
        display: none;
    }
}

.footer-info {
    position: relative; /* Relative positioning to anchor the close button */
    padding: 5px 8px;
    margin: 0;
    width: 100%;
    display: flex;
    align-items: center;
}

.footer-info p {
    flex-grow: 1; /* Allow paragraph to take the available space */
    text-align: center; /* Keep the content centered */
    margin: 0; /* Remove default margin */
}

.close-footer {
    position: absolute; /* Position absolutely within footer-info */
    right: 0; /* Pin to the far right */
    background-color: #4477aa;
    border: none;
    color: #ffffff;
    font-size: 1em;
    cursor: pointer;
    padding: 5px; /* Only a small padding around the "X" */
    width: auto; /* Set width to just fit the content */
    min-width: 10px; /* Ensure it's not too wide */
}

.close-footer:hover {
    color: #ff6666;
}

footer {
    position: fixed;
    bottom: 4px;
    left: 225px;
    right: 0;
    background-color: #2c2c2c;
    color: #fff;
    font-size: 0.8em;
    border: 1px solid #555;
    border-radius: 4px;
    margin: 0 19px;
}

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

a {
    color: #336699;
}

a:hover {
    color: #4477aa;
}

.popup-content {
    display: block;
    width: auto; /* Maintain the aspect ratio */
    height: auto; /* Maintain the aspect ratio */
    max-width: 90vw; /* Limit the width to viewport */
    max-height: 90vh; /* Limit the height to viewport */
    border-radius: 15px;
    cursor: pointer;
    object-fit: contain; /* Ensure the image fits within the constraints */
}

h3 a.tech-link {
    color: white;
    text-decoration: none;
  }
  
  h3 a.tech-link:hover {
    text-decoration: underline;
  }
  