/* Sub-section Styles */
.subsection {
    margin-top: 30px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

/* Section header for each sub-section */
.section-header {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: #e0e0e0;
    cursor: pointer;
}

.section-header h2 {
    margin-bottom: 5px;
    margin-top: 5px;
    font-size: 1.5em;
}

.section-logo {
    width: 30px;
    height: auto;
    margin-right: 10px;
    transition: filter 0.3s;
}

/* Content wrapper */

.section-content {
    padding: 15px;
}

/* Container for Tool Cards */
.container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.container a {
    display: block; /* Ensures the link behaves as a block-level element */
    text-decoration: none;
    color: inherit;
}

/* Tool Card Styles */
.tool-card {
    position: relative;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 20px;
    width: 300px;
    text-align: center;
    cursor: pointer;
    transition: box-shadow 0.3s, transform 0.3s;
    overflow: hidden;
}

.tool-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-image) no-repeat center center;
    background-size: cover;
    opacity: 0.15; /* Low opacity for subtle appearance */
    z-index: -1;
}

.tool-card:hover {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    transform: scale(1.02);
}

/* Collapsed section state */
.subsection.collapsed .section-content {
    display: none;
}

.subsection.collapsed .section-logo {
    filter: grayscale(100%);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        align-items: center;
    }

    .tool-card {
        width: 80%;
    }
}

@media (max-width: 480px) {
    .header-container {
        flex-direction: column;
        align-items: center;
    }

    .logo {
        margin-bottom: 10px;
    }
}


/* About button ------------------------------------------------------- */

/* Style the nav so it sits on the right and only holds that one button */
.main-nav {
    margin-left: auto;
    margin-right: 15px;
}

.main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Turn the About link into a circular “?” icon button */
.main-nav a[href="/about"] {
    display: inline-block;
    width: 2.5rem;
    height: 2.5rem;
    line-height: 2.5rem;
    border-radius: 50%;
    color: #2b2b2b;
    text-align: center;
    text-decoration: none;
    font-weight: bolder;
    text-shadow: #aaaaaa 1px 1px 1px;
    background-color: #fbfbfb;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

/* Hover & focus states */
.main-nav a[href="/about"]:hover,
.main-nav a[href="/about"]:focus {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
    outline: none;
}
