:root {
    --accent-blue: #007bff; /* A standard Bootstrap blue for accents */
    --border-color: #dee2e6; /* Bootstrap's default border color */
    --input-bg: #fff; /* White background for inputs */
    --text-primary: #333; /* Dark text for primary content */
    --text-secondary: #6c757d; /* Muted text for secondary content */
}

body {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    margin: 0;
    background-color: #f8f9fa;
    background-image: linear-gradient(to bottom, #f8f9fa, #fff);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #fff;
    border-bottom: 1px solid #f0f0f0;
}

.header .logo {
    font-size: 24px;
    font-weight: 700;
    color: #e5322d;
    text-decoration: none;
}

.header .nav a {
    margin: 0 15px;
    color: #333;
    font-weight: 700;
    text-decoration: none;
}

.hero-section {
    text-align: center;
    padding: 80px 20px;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-section p {
    font-size: 1.2rem;
    color: #6c757d;
    max-width: 800px;
    margin: 0 auto;
}

.category-tabs {
    text-align: center;
    margin-bottom: 40px;
}

.category-tabs .tab-link {
    display: inline-block;
    padding: 10px 20px;
    margin: 0 5px;
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    font-weight: 700;
    background-color: #fff;
    border: 1px solid #dee2e6;
}

.category-tabs .tab-link.active {
    background-color: #333;
    color: #fff;
}

.tools-section {
    padding: 40px 20px;
}

.tools-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Adjusted for narrower cards */
    gap: 20px;
}

.tool-card {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 20px;
    text-align: left;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

.tool-card:hover {
    transform: translateY(-5px);
}

.tool-icon {
    margin-bottom: 15px;
}

.tool-icon img {
    width: 70px; /* Increased size */
    height: auto; /* Height auto to maintain aspect ratio */
}

.tool-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.tool-card p {
    font-size: 0.9rem;
    color: #6c757d;
}

main {
    flex: 1 0 auto;
}

/* Footer Theming */
.footer {
    background-color: #2c3e50; /* Dark background for footer */
    color: #ecf0f1; /* Light text color */
    padding: 3rem 0;
    border-top: 1px solid #34495e;
}

.footer h5 {
    color: #ffffff; /* White headings */
    margin-bottom: 1.5rem;
}

.footer p {
    color: #bdc3c7; /* Lighter gray for paragraphs */
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer .social-icons a {
    color: #ecf0f1;
    font-size: 1.2rem;
    margin-right: 1rem;
    transition: color 0.3s ease;
}

.footer .social-icons a:hover {
    color: var(--accent-blue); /* Accent color on hover */
}

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

.footer-links li a {
    color: #bdc3c7;
    text-decoration: none;
    line-height: 2;
    transition: color 0.3s ease;
}

.footer-links li a:hover {
    color: var(--accent-blue);
}

.footer .copyright {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #34495e;
    font-size: 0.85rem;
    color: #95a5a6;
}

.footer .copyright a {
    color: var(--accent-blue);
    text-decoration: none;
}

.footer .copyright a:hover {
    text-decoration: underline;
}

/* Ensure admin photo in footer is styled */
.footer .admin-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-blue);
}

.category-icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-right: 10px;
}

.search-bar-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 30px auto 0 auto;
}

#toolSearchInput {
    padding: 10px 15px;
    border-radius: 25px;
    border: 1px solid #ced4da;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none; /* Hidden by default */
}

.search-results-dropdown .dropdown-item {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    text-align: left;
    color: #333;
    text-decoration: none;
    display: block;
}

.search-results-dropdown .dropdown-item:last-child {
    border-bottom: none;
}

.search-results-dropdown .dropdown-item:hover {
    background-color: #f8f9fa;
}