/* ==========================================================================
   Utilix.co.in - Modern Clean Design System (iLovePDF Grid & Privacy Hero)
   ========================================================================== */

:root {
    --bg-base: #ffffff;
    --bg-subtle: #f8fafc;
    --card-bg: #ffffff;
    --card-hover: #ffffff;
    --card-border: #e2e8f0;
    --card-border-hover: #3b82f6;

    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-btn: #e11d48; /* Accent Search Button */
    --primary-btn-hover: #be123c;

    --text-primary: #1e293b;
    --text-heading: #0f172a;
    --text-muted: #64748b;
    --text-faint: #94a3b8;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-pill: 9999px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 8px 24px rgba(59, 130, 246, 0.12);

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, "Helvetica Neue", sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-base: #090d16;
    --bg-subtle: #0f172a;
    --card-bg: #131c2e;
    --card-hover: #18233a;
    --card-border: #1e293b;
    --card-border-hover: #60a5fa;

    --text-primary: #f8fafc;
    --text-heading: #ffffff;
    --text-muted: #94a3b8;
    --text-faint: #64748b;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.6);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-center { text-align: center; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Header */
.site-header {
    background: var(--bg-base);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #4f46e5;
    font-size: 1.6rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-list {
    display: flex;
    gap: 1.25rem;
    list-style: none;
    align-items: center;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
}

.nav-link:hover { color: #4f46e5; }

.theme-toggle-btn {
    background: var(--bg-subtle);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

/* ==========================================================================
   Hero Section (Exact Reference Styling)
   ========================================================================== */
.hero-section {
    padding: 4.5rem 0 3rem;
    background: var(--bg-base);
}

.hero-container {
    max-width: 860px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.1rem;
    font-weight: 900;
    letter-spacing: -1.2px;
    line-height: 1.18;
    margin-bottom: 1.25rem;
    color: var(--text-heading);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 2rem;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

/* Privacy Shield Pill Badge */
.privacy-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.5rem 1.4rem;
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
}

[data-theme="dark"] .privacy-pill-badge {
    background: rgba(22, 101, 52, 0.2);
    border-color: rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

/* Hero Search Bar */
.search-wrapper {
    max-width: 620px;
    margin: 0 auto;
}

.hero-search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-base);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 0.4rem;
    box-shadow: var(--shadow-md);
}

.hero-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: var(--text-primary);
    font-family: inherit;
}

.hero-search-btn {
    background: #dc2626; /* Red Search Button from reference */
    color: #ffffff;
    border: none;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.hero-search-btn:hover {
    background: #b91c1c;
}

.featured-tool-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #334155;
    color: #ffffff;
    padding: 0.4rem 1.1rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
}

.featured-tool-pill:hover {
    background: #1e293b;
}

/* ==========================================================================
   iLovePDF-Style Categorized Tools Grid
   ========================================================================== */
.tools-grid-wrapper {
    padding: 2rem 0 5rem;
}

.category-block-section {
    margin-bottom: 4rem;
}

.category-section-title {
    font-size: 2.2rem;
    font-weight: 900;
    color: #dc2626; /* Red accent matching reference */
    letter-spacing: -0.5px;
    margin-bottom: 2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.cat-header-emoji {
    font-size: 2rem;
}

/* 4-Column iLovePDF Grid */
.ilovepdf-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.ilovepdf-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.25rem;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    min-height: 180px;
}

.ilovepdf-card:hover {
    border-color: var(--card-border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.ilovepdf-card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    line-height: 1;
}

.ilovepdf-card-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.ilovepdf-card-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Footer */
.site-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 3rem 0 2rem;
    margin-top: auto;
    text-align: center;
    font-size: 0.9rem;
}

.site-footer p { margin-bottom: 0.5rem; }
.site-footer a { color: #ffffff; text-decoration: none; }

/* Responsive Breakpoints */
@media (max-width: 1100px) {
    .ilovepdf-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-title { font-size: 2.2rem; }
    .hero-subtitle { font-size: 1rem; }
    .hide-mobile { display: none; }
    .ilovepdf-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .desktop-nav { display: none; }
}

@media (max-width: 480px) {
    .ilovepdf-grid {
        grid-template-columns: 1fr;
    }
    .hero-search-form {
        flex-direction: column;
    }
    .hero-search-btn {
        width: 100%;
    }
}