/* ==========================================================================
   DigiKavach - public site visual identity layer.

   This file sits ON TOP of marketing.css + the Theme Manager's injected
   CSS variables (see layouts/marketing.blade.php). It never redefines the
   --jc-* color tokens itself (those come from the active WebsiteTheme row,
   "DigiKavach Teal") - it only adds the structural/brand pieces that a
   simple palette swap can't express: header/footer layout, per-category
   icon colors, the hero's decorative background, and a handful of new
   components used on the redesigned homepage and tools directory.
   ========================================================================== */

body.jc-marketing {
    --jc-radius: 1rem;
    --jc-radius-lg: 1.25rem;
}

/* ---------- Header ---------- */
.jc-marketing-nav {
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid rgba(15, 42, 36, 0.08);
    box-shadow: 0 1px 0 rgba(15, 42, 36, 0.02);
    padding-top: .6rem;
    padding-bottom: .6rem;
}

.dk-brand {
    display: flex;
    align-items: center;
    gap: .65rem;
}

.dk-brand-mark {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dk-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

/* The header is always rendered light (see .jc-marketing-nav above),
   regardless of which WebsiteTheme is currently active elsewhere on
   the page (some available themes are dark) - so every header text
   color is a fixed value here, never a --jc-* theme variable. Using
   a theme variable here previously caused invisible white-on-white
   nav text whenever a dark theme was active. */
.dk-brand-name {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
    color: #0f2a24 !important;
}

.dk-brand-name span {
    color: var(--jc-accent);
}

.dk-brand-tagline {
    font-size: .68rem;
    color: #5b6b68 !important;
    font-weight: 500;
    white-space: nowrap;
}

.jc-marketing-nav .nav-link {
    color: #0f2a24 !important;
    font-weight: 600;
    font-size: .92rem;
    padding: .5rem .9rem !important;
}

.jc-marketing-nav .nav-link:hover,
.jc-marketing-nav .nav-link:focus {
    color: var(--jc-accent) !important;
}

.jc-marketing-nav .nav-link.active {
    color: var(--jc-accent) !important;
}

.jc-marketing-nav .nav-link.active::after {
    background: var(--jc-accent);
}

.dk-nav-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f4faf8;
    border: 1px solid #e1ede9;
    color: #0f2a24;
    flex-shrink: 0;
    transition: background-color .2s ease, color .2s ease;
}

.dk-nav-icon-btn:hover {
    background: var(--jc-accent-soft);
    color: var(--jc-accent);
}

.dk-btn-pill {
    border-radius: 999px !important;
    font-weight: 600;
    padding: .55rem 1.1rem !important;
}

/* Compact header search, hidden until the search icon is clicked */
.dk-nav-search {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: var(--jc-surface);
    border-bottom: 1px solid var(--jc-border);
    box-shadow: 0 12px 24px -12px rgba(15, 42, 36, 0.15);
    padding: 1rem 0;
    z-index: 1040;
}

.dk-nav-search.dk-open {
    display: block;
}

/* ---------- Hero (re-themed for the light/teal identity) ---------- */
.jc-hero {
    background:
        radial-gradient(60% 60% at 88% 8%, rgba(15, 157, 120, 0.14), transparent 70%),
        radial-gradient(55% 55% at 8% 95%, rgba(13, 140, 106, 0.12), transparent 70%),
        var(--jc-canvas);
}

.jc-hero .jc-gradient-text {
    background: linear-gradient(120deg, var(--jc-accent), var(--jc-accent-2) 60%, #10b981);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.jc-hero-media-fallback i {
    background: linear-gradient(120deg, var(--jc-accent), var(--jc-accent-2) 60%, #10b981);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- Tool search (hero + directory) ---------- */
.dk-search-box {
    background: var(--jc-surface);
    border: 1px solid var(--jc-border);
    border-radius: 999px;
    padding: .4rem .4rem .4rem 1.25rem;
    box-shadow: 0 12px 30px -16px rgba(15, 42, 36, 0.18);
}

.dk-search-box input {
    border: none;
    background: transparent;
    flex: 1;
    font-size: .95rem;
    color: var(--jc-text);
    outline: none;
    min-width: 0;
}

.dk-search-box input::placeholder {
    color: var(--jc-text-faint);
}

.dk-search-box .btn {
    border-radius: 999px;
    white-space: nowrap;
}

.dk-search-suggestions a {
    background: var(--jc-surface);
    border: 1px solid var(--jc-border);
    border-radius: 999px;
    padding: .3rem .9rem;
    font-size: .82rem;
    color: var(--jc-text-muted);
    text-decoration: none;
    transition: all .15s ease;
}

.dk-search-suggestions a:hover {
    border-color: var(--jc-accent);
    color: var(--jc-accent);
}

/* ---------- Category cards (per-category icon colors) ---------- */
.dk-cat-card {
    background: var(--jc-surface);
    border: 1px solid var(--jc-border);
    border-radius: var(--jc-radius);
    padding: 1.4rem 1.1rem;
    height: 100%;
    text-decoration: none;
    display: block;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.dk-cat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 36px -20px rgba(15, 42, 36, 0.22);
    border-color: var(--jc-accent);
}

.dk-cat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: .9rem;
}

.dk-cat-name {
    font-weight: 700;
    font-size: .98rem;
    color: var(--jc-text);
    margin-bottom: .15rem;
}

.dk-cat-count {
    font-size: .82rem;
    color: var(--jc-text-muted);
}

/* Per-category accent colors - independent of the site theme so each
   category keeps its own visual identity in the directory/homepage,
   the same way the reference design uses one color per tool family. */
.dk-cat-ssl { background: #10b981; }
.dk-cat-dns { background: #3b82f6; }
.dk-cat-domain { background: #8b5cf6; }
.dk-cat-website { background: #f97316; }
.dk-cat-security { background: #ef4444; }
.dk-cat-email { background: #0ea5e9; }
.dk-cat-performance { background: #ec4899; }
.dk-cat-seo { background: #7c3aed; }
.dk-cat-api { background: #4f46e5; }
.dk-cat-git { background: #ea580c; }
.dk-cat-devops { background: #0891b2; }
.dk-cat-linux { background: #16a34a; }
.dk-cat-database { background: #7c2d92; }
.dk-cat-aws { background: #d97706; }
.dk-cat-k8s { background: #326ce5; }
.dk-cat-programming { background: #db2777; }
.dk-cat-frontend { background: #7c3aed; }
.dk-cat-image { background: #0d9488; }
.dk-cat-security-auth { background: #dc2626; }
.dk-cat-file-data { background: #65a30d; }
.dk-cat-data-cs { background: #4338ca; }
.dk-cat-default { background: var(--jc-accent); }

/* ---------- Tool cards (directory + homepage popular tools) ---------- */
.dk-tool-card {
    background: var(--jc-surface);
    border: 1px solid var(--jc-border);
    border-radius: var(--jc-radius);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.dk-tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px -20px rgba(15, 42, 36, 0.2);
    border-color: var(--jc-accent);
}

.dk-tool-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    flex-shrink: 0;
}

/* ---------- Stat strip ---------- */
.dk-stat-strip {
    background: var(--jc-surface);
    border: 1px solid var(--jc-border);
    border-radius: var(--jc-radius);
}

/* ---------- Quote / testimonial pill ---------- */
.dk-quote-card {
    background: var(--jc-accent-soft);
    border-radius: var(--jc-radius);
    padding: 1.25rem 1.5rem;
}

/* ---------- Hosting / affiliate CTA banner ---------- */
.dk-hosting-banner {
    background: var(--jc-gradient-primary);
    border-radius: var(--jc-radius-lg);
    color: #fff;
    padding: 1.75rem 2rem;
}

.dk-hosting-banner .btn-light {
    border-radius: 999px;
    font-weight: 700;
}

/* ---------- Footer (deep navy-teal, distinct from the light body) ---------- */
.jc-marketing-footer {
    background: #0b1f1b;
    color: #cfe3dd;
}

.jc-marketing-footer .dk-brand-name,
.jc-marketing-footer h3 {
    color: #ffffff;
}

.jc-marketing-footer a {
    color: #a9c4bd;
}

.jc-marketing-footer a:hover {
    color: #ffffff;
}

.jc-marketing-footer .border-top {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.jc-marketing-footer .form-control {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.jc-marketing-footer .form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* ---------- Structured tool content (What Is/Why Use/How To/etc.) ---------- */
.jc-tool-article h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 1.75rem;
    margin-bottom: .75rem;
}

.jc-tool-article h2:first-child {
    margin-top: 0;
}

.jc-tool-article h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-top: 1.25rem;
    margin-bottom: .5rem;
}

.jc-tool-article p {
    color: var(--jc-text-muted);
    margin-bottom: .9rem;
}

.jc-tool-article ul,
.jc-tool-article ol {
    color: var(--jc-text-muted);
    margin-bottom: .9rem;
    padding-left: 1.3rem;
}

.jc-tool-article li {
    margin-bottom: .35rem;
}

.jc-tool-article code {
    background: var(--jc-canvas);
    border: 1px solid var(--jc-border);
    border-radius: 4px;
    padding: .1rem .35rem;
    font-size: .85em;
    color: var(--jc-text);
}

.jc-tool-article pre {
    background: var(--jc-canvas);
    border: 1px solid var(--jc-border);
    border-radius: var(--jc-radius-sm, .55rem);
    padding: .9rem 1rem;
    overflow-x: auto;
    margin-bottom: .9rem;
}

.jc-tool-article pre code {
    background: none;
    border: none;
    padding: 0;
}

/* ---------- Ad slots (public site, Phase 4) ---------- */
.dk-ad-slot {
    max-width: 100%;
    overflow: hidden;
    text-align: center;
    clear: both;
}

.dk-ad-slot .adsbygoogle {
    max-width: 100%;
}

@media (max-width: 991.98px) {
    .dk-brand-tagline { display: none; }
}
