:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #10b981;
    --bg-light: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
}

.hero-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

/* Hamburger toggle button: hidden by default (desktop), shown only under
   the mobile breakpoint in global-mobile.css. Exists on every navbar the
   site has (homepage, standard tool navbar, fused tool headers, blog,
   news) - see the shared toggle script wired up alongside each one. */
.nav-toggle {
    display: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: white;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-block;
}

.btn-outline {
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
}
.btn-outline:hover {
    background: rgba(255,255,255,0.1);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}
.btn-primary:hover {
    background-color: var(--primary-dark);
}
.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    margin-left: 24px;
    font-weight: 500;
    transition: color 0.3s ease;
}
.nav-links a:hover {
    color: var(--primary);
}

.info-section {
    padding: 80px 24px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.contact-card {
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 32px auto 0;
    text-align: left;
    border: 1px solid #e2e8f0;
}
.contact-card p {
    margin-bottom: 12px;
    color: var(--text-dark);
}
.contact-card a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .header-right {
        display: none !important;
    }
    .nav-links {
        display: none;
    }
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

.hero-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.highlight {
    color: #60a5fa;
}

.subtitle {
    font-size: 1.25rem;
    color: #94a3b8;
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.tools-section {
    padding: 5rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.125rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.tool-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    text-decoration: none;
    color: var(--text-main);
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.placeholder-card {
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
    pointer-events: none;
}

.tool-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.icon-blue { background: #eff6ff; color: #3b82f6; }
.icon-purple { background: #faf5ff; color: #a855f7; }
.icon-green { background: #f0fdf4; color: #22c55e; }
.icon-gray { background: #e2e8f0; color: #64748b; }

.tool-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.tool-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.tool-link {
    font-weight: 600;
    color: var(--primary);
}

footer {
    text-align: center;
    padding: 3rem;
    background: white;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

/* Tools Controls (Search & Categories) */
.tools-controls {
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.search-box {
    position: relative;
    width: 100%;
    max-width: 600px;
}

.search-box svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    font-size: 1.125rem;
    border: 2px solid var(--border);
    border-radius: 9999px; /* Pill shape */
    outline: none;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.1);
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.category-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    background: white;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.category-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.category-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}


/* Transitions */
body, .navbar, .tool-card, .article-card, .article-container, .news-card, .category-btn {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Feedback Widget */
.feedback-widget {
    margin: 40px auto 20px auto;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-align: center;
    max-width: 400px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.feedback-widget p {
    font-size: 15px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 15px;
}
.feedback-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}
.feedback-buttons button {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #475569;
}
.feedback-buttons button:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    transform: translateY(-2px);
}
.feedback-buttons .btn-like:hover {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}
.feedback-buttons .btn-dislike:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}

/* Tool Page Footer */
.app-footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 14px;
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 12px;
}
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}
.footer-links a:hover {
    color: var(--primary);
}

/* Related Tools cross-links (shared across all "shared" stylesheet-mode tools) */
.related-tools-section {
    max-width: 900px;
    margin: 0 auto 24px;
    padding: 0 20px;
}
.related-tools-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main, #0f172a);
    margin-bottom: 20px;
}
.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.related-tool-card {
    display: block;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 10px;
    padding: 16px 18px;
    background: #ffffff;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.related-tool-card:hover {
    border-color: var(--primary, #2563eb);
    box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.1);
}
.related-tool-card strong {
    display: block;
    color: var(--primary, #2563eb);
    font-size: 0.95rem;
    margin-bottom: 6px;
}
.related-tool-card span {
    display: block;
    color: var(--text-muted, #64748b);
    font-size: 0.85rem;
    line-height: 1.5;
}
@media (max-width: 768px) {
    .related-tools-grid {
        grid-template-columns: 1fr;
    }
}

/* Per-tool FAQ section (shared across all "shared" stylesheet-mode tools) */
.tool-faq-section {
    max-width: 900px;
    margin: 0 auto 40px;
    padding: 0 20px;
}
.tool-faq-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main, #0f172a);
    margin-bottom: 20px;
}
.tool-faq-section .faq-item {
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 10px;
    margin-bottom: 10px;
    background: #ffffff;
    overflow: hidden;
}
.tool-faq-section .faq-item summary {
    cursor: pointer;
    padding: 14px 44px 14px 18px;
    font-weight: 600;
    color: var(--text-main, #0f172a);
    font-size: 0.95rem;
    list-style: none;
    position: relative;
}
.tool-faq-section .faq-item summary::-webkit-details-marker {
    display: none;
}
.tool-faq-section .faq-item summary::after {
    content: '+';
    position: absolute;
    right: 18px;
    top: 12px;
    font-size: 1.3rem;
    line-height: 1;
    color: var(--primary, #2563eb);
    transition: transform 0.2s;
}
.tool-faq-section .faq-item[open] summary::after {
    transform: rotate(45deg);
}
.tool-faq-section .faq-item summary:hover {
    background: #f8fafc;
}
.tool-faq-section .faq-item p {
    padding: 0 18px 16px;
    margin: 0;
    color: var(--text-muted, #64748b);
    font-size: 0.9rem;
    line-height: 1.65;
}
.tool-faq-section .faq-item p a {
    color: var(--primary, #2563eb);
}

/* Reference guides band on the homepage (added 2026-09-18) */
.guides-section { padding: 3rem 5% 4rem; max-width: 1200px; margin: 0 auto; }
.guides-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.guide-card { display: block; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 1.1rem 1.2rem; text-decoration: none; color: #0f172a; transition: transform 0.15s, box-shadow 0.15s; }
.guide-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -8px rgba(0,0,0,0.15); }
.guide-card strong { display: block; color: #2563eb; margin-bottom: 4px; }
.guide-card span { font-size: 0.92rem; color: #64748b; line-height: 1.5; }
