/* --- Global Styles & Variables --- */
:root {
    --primary-blue: #007bff;
    --accent-blue: #0056b3;
    --light-blue-bg: #e7f3ff;
    --text-color: #333;
    --muted-text-color: #6c757d;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    --card-hover-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
    --border-radius: 8px;
    --font-family: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f9f9f9; /* Light overall background */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: var(--primary-blue);
}

a:hover {
    color: var(--accent-blue);
}

/* --- Header --- */
.site-header {
    background-color: var(--card-bg);
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8em;
    font-weight: 600;
    color: var(--primary-blue);
}

.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav ul li {
    margin-left: 25px;
}

.main-nav ul li a {
    font-weight: 500;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    color: var(--primary-blue);
}

.header-contact a {
    font-size: 0.9em;
    color: var(--muted-text-color);
}
.header-contact a:hover {
    color: var(--primary-blue);
}

.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    font-size: 1.5em;
    color: var(--primary-blue);
    cursor: pointer;
}


/* --- Hero Section --- */
.hero-section {
    background-color: var(--light-blue-bg);
    padding: 80px 0;
    text-align: center;
}

.hero-section h1 {
    font-size: 2.8em;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 20px;
}

.hero-section .subheadline {
    font-size: 1.2em;
    color: var(--muted-text-color);
    max-width: 700px;
    margin: 0 auto 30px auto;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-blue);
    color: white;
    padding: 12px 30px;
    font-size: 1.1em;
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.cta-button:hover {
    background-color: var(--accent-blue);
    color: white;
    transform: translateY(-2px);
}

.hero-icons {
    margin-top: 40px;
}

.hero-icons i {
    font-size: 2em;
    color: var(--primary-blue);
    margin: 0 15px;
    opacity: 0.7;
}

/* --- Search Section --- */
.search-section {
    padding: 40px 0;
    background-color: #fff; /* White background to make search prominent */
    border-bottom: 1px solid #eee;
}

#toolSearch {
    width: 100%;
    max-width: 600px; /* Control max width on larger screens */
    display: block;
    margin: 0 auto;
    padding: 15px 20px;
    font-size: 1.1em;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

#toolSearch:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

/* --- Tool Sections --- */
.tools-overview {
    padding: 20px 0; /* Reduced top padding as search has its own */
}
.tool-category {
    padding: 50px 0;
}
.tool-category:nth-child(even) {
    background-color: var(--light-blue-bg); /* Alternate background for sections */
}


.tool-category h2 {
    font-size: 2.2em;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 10px;
    text-align: center;
}
.tool-category h2 i {
    margin-right: 10px;
}

.category-description {
    font-size: 1.1em;
    color: var(--muted-text-color);
    text-align: center;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.tool-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 25px;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Pushes button to bottom */
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
}

.tool-icon {
    font-size: 2.5em;
    color: var(--primary-blue);
    margin-bottom: 15px;
}

.tool-card h3 {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
}

.tool-card p {
    font-size: 0.95em;
    color: var(--muted-text-color);
    margin-bottom: 20px;
    flex-grow: 1; /* Allows description to take available space */
}

.tool-button {
    display: inline-block;
    background-color: var(--primary-blue);
    color: white;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: background-color 0.3s ease;
    align-self: center; /* Center button if it's not full width */
}

.tool-button:hover {
    background-color: var(--accent-blue);
    color: white;
}

/* --- Footer --- */
.site-footer-bottom {
    background-color: #333; /* Dark footer */
    color: #f0f0f0;
    padding: 40px 0;
    text-align: center;
}

.site-footer-bottom .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.site-footer-bottom .logo {
    color: #fff; /* White logo in footer */
    font-size: 1.5em;
}
.footer-logo-tagline p {
    font-size: 0.9em;
    color: #ccc;
    margin-top: 5px;
}

.footer-contact p {
    margin-bottom: 5px;
    color: #ddd;
}
.footer-contact a {
    color: var(--primary-blue);
}
.footer-contact a:hover {
    color: #5cb8ff; /* Lighter blue for hover on dark bg */
}

.footer-links a {
    color: #ccc;
    margin: 0 10px;
    font-size: 0.9em;
}
.footer-links a:hover {
    color: #fff;
}


/* --- Responsive Design --- */
@media (max-width: 992px) {
    .hero-section h1 {
        font-size: 2.4em;
    }
    .hero-section .subheadline {
        font-size: 1.1em;
    }
    .tool-category h2 {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    .site-header .container {
        flex-wrap: wrap; /* Allow items to wrap */
    }
    .main-nav {
        order: 3; /* Move nav below logo and contact/hamburger */
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }
    .main-nav.active {
        max-height: 300px; /* Adjust as needed */
        padding-top: 10px;
    }
    .main-nav ul {
        flex-direction: column;
        align-items: center;
    }
    .main-nav ul li {
        margin: 10px 0;
        width: 100%;
        text-align: center;
    }
    .menu-toggle {
        display: block; /* Show hamburger */
        order: 2; /* Place it after logo on mobile */
    }
    .header-contact {
        display: none; /* Hide header contact on mobile, rely on footer/contact page */
    }

    .hero-section {
        padding: 60px 0;
    }
    .hero-section h1 {
        font-size: 2em;
    }
    .hero-section .subheadline {
        font-size: 1em;
    }
    .hero-icons i {
        font-size: 1.8em;
        margin: 0 10px;
    }

    .tool-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Adjust minmax for smaller screens */
        gap: 20px;
    }
    .tool-card {
        padding: 20px;
    }

    .site-footer-bottom .container {
        /* Already column, so good for mobile */
    }
    .footer-logo-tagline, .footer-contact, .footer-links {
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.5em;
    }
    .hero-section h1 {
        font-size: 1.8em;
    }
    .hero-section .subheadline {
        font-size: 0.9em;
    }
    .cta-button {
        padding: 10px 20px;
        font-size: 1em;
    }
    .hero-icons {
        display: none; /* Optionally hide on very small screens to save space */
    }
    #toolSearch {
        font-size: 1em;
        padding: 12px 15px;
    }
    .tool-category h2 {
        font-size: 1.8em;
    }
    .category-description {
        font-size: 1em;
    }
}

/* For Search Functionality (Visual Feedback) */
.tool-card.hidden {
    display: none;
}
.tool-category.hidden-category {
    display: none;
}