/* public/style.css */
:root {
    --primary: #2d3748;
    --secondary: #4fd1c5;
    --bg-color: #f7fafc;
    --text-main: #1a202c;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    --badge-bg: #d1fae5;
    --badge-text: #059669;
    --input-border: #000000;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 15px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-main);
}

.logo span {
    color: var(--secondary);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--secondary);
}

/* Dropdown Menu Styles */
.nav-links .dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #ffffff;
    min-width: 220px;
    box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 100;
    border-radius: 8px;
    padding: 10px 0;
    margin: 0;
    border: 1px solid var(--border-color);
}

.dropdown-content li {
    list-style: none;
    width: 100%;
}

.dropdown-content a {
    color: var(--text-main);
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
    transition: background-color 0.2s;
}

.dropdown-content a:hover {
    background-color: var(--bg-hover, rgba(0, 0, 0, 0.03));
    color: var(--secondary);
}

.nav-links .dropdown:hover .dropdown-content {
    display: block;
}

@media (max-width: 768px) {
    .dropdown-content {
        position: static;
        display: block;
        box-shadow: none;
        border: none;
        padding-left: 15px;
    }

    .dropdown .dropbtn {
        display: none;
    }
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 15px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.breadcrumbs ul {
    list-style: none;
    display: flex;
    gap: 8px;
}

.breadcrumbs li::after {
    content: '/';
    margin-left: 8px;
    color: var(--border-color);
}

.breadcrumbs li:last-child::after {
    content: '';
}

.breadcrumbs a {
    color: var(--secondary);
    text-decoration: none;
}

.page-content {
    min-height: 70vh;
    padding: 40px 0;
}

/* Home / Category pages */
.home-hero,
.category-hero {
    text-align: center;
    margin-bottom: 50px;
}

.home-hero h1,
.category-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.home-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.category-card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.category-card h2 a {
    text-decoration: none;
    color: var(--text-main);
}

.popular-links {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.popular-links a,
.tool-list a {
    display: inline-block;
    background: var(--bg-color);
    padding: 6px 12px;
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.popular-links a:hover,
.tool-list a:hover {
    background: var(--secondary);
    color: #fff;
}

.tool-list ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Converter UI (Matching Screenshot) */
.converter-wrapper {
    max-width: 600px;
    margin: 0 auto 50px auto;
    text-align: center;
}

.tool-heading {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #1a365d;
}

.conversion-formula {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.converter-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: -20px;
    position: relative;
    padding-bottom: 20px;
}

.input-group {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    height: 80px;
    border: 2px solid var(--input-border);
    border-radius: 40px;
    padding: 0 160px 0 30px;
    font-size: 1.8rem;
    font-family: 'Outfit', sans-serif;
    color: var(--text-muted);
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
}

.input-group input:focus {
    border-color: var(--secondary);
    color: var(--text-main);
}

.unit-badge {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--badge-bg);
    color: var(--badge-text);
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 500;
    font-size: 1rem;
    pointer-events: none;
}

.swap-btn {
    position: absolute;
    top: calc(50% - 15px);
    /* between the two inputs */
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    z-index: 10;
    transition: transform 0.2s, box-shadow 0.2s;
}

.swap-btn:hover {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.swap-btn svg {
    width: 24px;
    height: 24px;
}

.seo-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    margin-top: 40px;
}

.seo-content h2 {
    margin-bottom: 15px;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 30px 0;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: #fff;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
        padding: 20px;
        z-index: 100;
    }

    .nav-links.active {
        display: flex;
    }

    .converter-box {
        padding: 0 15px 20px 15px;
    }
}

@media (max-width: 600px) {

    .home-hero h1,
    .category-hero h1 {
        font-size: 2rem;
    }

    .tool-heading {
        font-size: 1.5rem;
    }

    .input-group input {
        height: 60px;
        font-size: 1.4rem;
        padding: 0 120px 0 20px;
    }

    .unit-badge {
        padding: 6px 12px;
        font-size: 0.85rem;
        right: 10px;
    }

    .swap-btn {
        width: 40px;
        height: 40px;
    }

    .swap-btn svg {
        width: 18px;
        height: 18px;
    }

    .seo-article {
        padding: 20px;
        margin-top: 30px;
    }

    .seo-article h2 {
        font-size: 1.5rem;
    }

    .seo-article h3 {
        font-size: 1.25rem;
    }

    .seo-table th,
    .seo-table td {
        padding: 10px;
    }
}

/* public/style.css addition */
.seo-article {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    margin-top: 50px;
    text-align: left;
}

.seo-article h2 {
    color: #1a365d;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.seo-article h3 {
    color: #2d3748;
    margin: 30px 0 15px 0;
    font-size: 1.4rem;
}

.seo-article h4 {
    color: #2d3748;
    margin: 20px 0 10px 0;
    font-size: 1.1rem;
}

.seo-article p,
.seo-article li {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-main);
    margin-bottom: 15px;
}

.seo-article ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.highlight-box {
    background: var(--badge-bg);
    padding: 20px;
    border-left: 4px solid var(--secondary);
    border-radius: 0 8px 8px 0;
    margin: 20px 0;
}

.highlight-box p {
    margin-bottom: 0;
    color: var(--badge-text);
}

.seo-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #fff;
}

.seo-table th,
.seo-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.seo-table th {
    background-color: var(--bg-color);
    font-weight: 600;
    color: #1a365d;
}

.faq-item {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.faq-item:last-child {
    border-bottom: none;
}

.article-conclusion {
    margin-top: 30px;
    font-weight: 500;
}

/* Search Bar Styles */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 30px auto 0 auto;
}

#searchInput {
    width: 100%;
    padding: 15px 25px;
    font-size: 1.2rem;
    border: none;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    outline: none;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 10px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    text-align: left;
}

.search-results.active {
    display: block;
}

.search-result-item {
    display: block;
    padding: 12px 20px;
    color: var(--text-main);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--bg-color);
    color: var(--secondary);
}

/* Footer Bottom Layout */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-links {
    list-style: none;
    display: flex;
    gap: 15px;
    margin: 0;
    padding: 0;
}

.footer-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--secondary);
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
    }
}