/*
Category Page CSS
Created: 2026-02-19
Purpose: Styling for category landing pages (/dns, /ip, /domain)
*/

/* ============================================
   PAGE WRAPPER
   ============================================ */

.category-page-wrapper {
    position: relative;
    background: hsl(var(--background));
    overflow: hidden;
}

.category-page-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(hsl(var(--foreground) / 0.03) 1px, transparent 1px),
        linear-gradient(90deg, hsl(var(--foreground) / 0.03) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   HERO SECTION
   ============================================ */

.category-hero {
    position: relative;
    z-index: 1;
    padding: 6rem 1.5rem 4rem;
    text-align: center;
}

.category-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150%;
    height: 100%;
    background: radial-gradient(
        ellipse 50% 80% at 50% 0%,
        hsl(var(--primary) / 0.12) 0%,
        transparent 70%
    );
    pointer-events: none;
    z-index: -1;
}

@media (min-width: 768px) {
    .category-hero {
        padding: 8rem 2rem 5rem;
    }
}

.category-hero-content {
    max-width: 680px;
    margin: 0 auto;
}

/* Hero Icon */
.category-hero-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.5rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-hero-icon svg {
    width: 36px;
    height: 36px;
}

.category-hero-icon.dns {
    background: hsl(187 85% 43% / 0.15);
    color: hsl(187 85% 43%);
}

.category-hero-icon.ip {
    background: hsl(142 71% 45% / 0.15);
    color: hsl(142 71% 45%);
}

.category-hero-icon.domain {
    background: hsl(350 70% 50% / 0.15);
    color: hsl(350 70% 50%);
}

@media (min-width: 768px) {
    .category-hero-icon {
        width: 88px;
        height: 88px;
        margin-bottom: 2rem;
    }

    .category-hero-icon svg {
        width: 44px;
        height: 44px;
    }
}

/* Hero Title */
.category-hero-title {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: hsl(var(--foreground));
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .category-hero-title {
        font-size: 3.5rem;
        margin-bottom: 1.25rem;
    }
}

/* Hero Subtitle */
.category-hero-subtitle {
    font-size: 1rem;
    line-height: 1.6;
    color: hsl(var(--muted-foreground));
    max-width: 520px;
    margin: 0 auto 1.5rem;
}

@media (min-width: 768px) {
    .category-hero-subtitle {
        font-size: 1.125rem;
        margin-bottom: 2rem;
    }
}

/* Hero Stats */
.category-hero-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.category-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--foreground));
}

.category-stat svg {
    width: 16px;
    height: 16px;
    color: hsl(var(--primary));
}

/* ============================================
   TOOLS GRID SECTION
   ============================================ */

.category-tools-section {
    position: relative;
    z-index: 1;
    padding: 0 1.5rem 4rem;
}

@media (min-width: 768px) {
    .category-tools-section {
        padding: 0 2rem 5rem;
    }
}

.category-tools-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Reuse home page tool grid styles */
.tools-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 480px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

@media (min-width: 1024px) {
    .tools-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tool Card */
.tool-card {
    position: relative;
    padding: 1rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 12px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
}

@media (min-width: 768px) {
    .tool-card {
        padding: 1.25rem;
    }
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px hsl(var(--foreground) / 0.06);
    border-color: hsl(var(--primary) / 0.3);
}

/* Tool Icon */
.tool-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    flex-shrink: 0;
}

.tool-icon svg {
    width: 20px;
    height: 20px;
}

.tool-icon.dns { background: hsl(187 85% 43% / 0.12); color: hsl(187 85% 43%); }
.tool-icon.ip { background: hsl(142 71% 45% / 0.12); color: hsl(142 71% 45%); }
.tool-icon.domain { background: hsl(350 70% 50% / 0.12); color: hsl(350 70% 50%); }

/* Tool Title */
.tool-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 0.25rem;
}

/* Tool Description */
.tool-description {
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.4;
    margin-bottom: 0.75rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Tool Footer */
.tool-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid hsl(var(--border));
}

/* Category Badge */
.category-badge {
    padding: 0.25rem 0.5rem;
    font-size: 0.625rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.category-badge.dns { background: hsl(187 85% 43% / 0.1); color: hsl(187 85% 43%); }
.category-badge.ip { background: hsl(142 71% 45% / 0.1); color: hsl(142 71% 45%); }
.category-badge.domain { background: hsl(350 70% 50% / 0.1); color: hsl(350 70% 50%); }

/* Tool CTA */
.tool-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: hsl(var(--primary));
}

.tool-cta svg {
    width: 12px;
    height: 12px;
    transition: transform 0.2s ease;
}

.tool-card:hover .tool-cta svg {
    transform: translateX(2px);
}

/* ============================================
   CONTENT SECTION (SEO)
   ============================================ */

.category-content-section {
    position: relative;
    z-index: 1;
    padding: 4rem 1.5rem;
    background: hsl(var(--muted) / 0.3);
}

@media (min-width: 768px) {
    .category-content-section {
        padding: 5rem 2rem;
    }
}

.category-content-container {
    max-width: 720px;
    margin: 0 auto;
}

.category-content-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: hsl(var(--foreground));
    margin-bottom: 1.5rem;
    text-align: center;
}

@media (min-width: 768px) {
    .category-content-title {
        font-size: 2rem;
    }
}

.category-content-text {
    font-size: 1rem;
    line-height: 1.8;
    color: hsl(var(--muted-foreground));
}

.category-content-text p {
    margin-bottom: 1rem;
}

.category-content-text p:last-child {
    margin-bottom: 0;
}

/* ============================================
   RELATED CATEGORIES SECTION
   ============================================ */

.category-related-section {
    position: relative;
    z-index: 1;
    padding: 4rem 1.5rem;
    background: hsl(var(--background));
}

@media (min-width: 768px) {
    .category-related-section {
        padding: 5rem 2rem;
    }
}

.category-related-container {
    max-width: 800px;
    margin: 0 auto;
}

.category-related-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: hsl(var(--foreground));
    margin-bottom: 1.5rem;
    text-align: center;
}

@media (min-width: 768px) {
    .category-related-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }
}

.category-related-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .category-related-grid {
        flex-direction: row;
        gap: 1rem;
    }
}

.category-related-card {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.category-related-card:hover {
    border-color: hsl(var(--primary) / 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px hsl(var(--foreground) / 0.05);
}

.category-related-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.category-related-icon svg {
    width: 24px;
    height: 24px;
}

.category-related-icon.dns {
    background: hsl(187 85% 43% / 0.12);
    color: hsl(187 85% 43%);
}

.category-related-icon.ip {
    background: hsl(142 71% 45% / 0.12);
    color: hsl(142 71% 45%);
}

.category-related-icon.domain {
    background: hsl(350 70% 50% / 0.12);
    color: hsl(350 70% 50%);
}

.category-related-info {
    flex: 1;
    min-width: 0;
}

.category-related-name {
    font-size: 1rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 0.125rem;
}

.category-related-count {
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
}

.category-related-arrow {
    width: 20px;
    height: 20px;
    color: hsl(var(--muted-foreground));
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.category-related-card:hover .category-related-arrow {
    color: hsl(var(--primary));
    transform: translateX(3px);
}
