/* Custom styles */
:root {
    --primary-color: #3b82f6; /* blue-500 */
    --primary-color-dark: #2563eb; /* blue-600 */
    --background-color: #f8fafc; /* gray-50 */
    --card-background: white;
    --text-primary: #1f2937; /* gray-800 */
    --text-secondary: #6b7280; /* gray-500 */
    --border-color: #e5e7eb; /* gray-200 */
    --font-family: 'Figtree', sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-primary);
    background-image: linear-gradient(to top, #f3f4f6 0%, #f8fafc 100%);
}

/* --- Global Styles --- */

header {
    transition: box-shadow 0.3s ease-in-out, background-color 0.3s ease-in-out;
    background-color: rgba(255, 255, 255, 0.8);
}
header .text-2xl {
    transition: color 0.3s ease;
}
header .text-2xl:hover {
    color: var(--primary-color);
}
header.scrolled {
    background-color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.nav-link {
    position: relative;
    transition: color 0.2s;
}
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 50%;
    background-color: var(--primary-color);
    transition: all 0.3s ease-in-out;
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
    left: 0;
}
.nav-link.active {
    color: var(--primary-color-dark);
    font-weight: 600;
}
.nav-link:not(.active):hover {
    color: var(--primary-color);
}

.btn-primary {
    transition: all 0.2s;
}
.btn-primary:hover {
    transform: translateY(-2px);
    background-color: var(--primary-color-dark);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

footer {
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
}
footer a.text-gray-500:hover {
    color: var(--primary-color);
    text-decoration: underline;
}
footer .flex.space-x-6 a {
    transition: color 0.3s ease, transform 0.3s ease;
}
footer .flex.space-x-6 a:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* --- Card Styles (Global for Homepage & Popular Tools) --- */

.bento-card {
    background-color: var(--card-background);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    padding: 1rem;
    transition: all 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bento-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05), 0 0 0 2px var(--primary-color);
}

/* --- Homepage-ONLY Styles --- */

.page-home #search-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    border-color: var(--primary-color);
}

.page-home .bento-card {
    animation: fadeIn 0.5s ease-in-out forwards;
    opacity: 0;
}

.page-home .category-btn {
    transition: all 0.2s ease-in-out;
}
.page-home .category-btn:hover:not(.active) {
    background-color: #e5e7eb;
    transform: translateY(-2px);
}
.page-home .category-btn.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

/* --- Tool Page Styles --- */
.page-tool .popular-tools-section h2 {
    color: var(--text-primary);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
