/**
 * Tawhid Mega Portal - Core Theme & SaaS Stylesheet
 * High performance, modern glassmorphism, responsive
 * GeneratePress & WooCommerce Integration
 */

:root {
    --tawhid-primary: #6366f1;
    --tawhid-primary-hover: #4f46e5;
    --tawhid-accent: #06b6d4;
    --tawhid-bg-dark: #0f172a;
    --tawhid-card-bg: #1e293b;
    --tawhid-border: #334155;
    --tawhid-text: #f8fafc;
    --tawhid-text-muted: #94a3b8;
}

/* Hide default GeneratePress header and navigation elements */
#masthead.site-header,
#site-navigation.main-navigation,
.site-header,
.main-navigation {
    display: none !important;
}

/* Global body & container dark mode overrides */
body, 
#page, 
.site, 
.site-content, 
.entry-content,
.inside-article {
    background-color: var(--tawhid-bg-dark) !important;
    color: var(--tawhid-text) !important;
    margin: 0 !important;
    padding: 0 !important;
}

.site-info {
    background-color: #0b1120 !important;
    color: var(--tawhid-text-muted) !important;
    border-top: 1px solid var(--tawhid-border) !important;
    padding: 1.5rem 0 !important;
    font-size: 0.85rem !important;
}

.site-info a {
    color: #818cf8 !important;
}

/* Base resets & typography */
.tawhid-portal-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--tawhid-text);
    background-color: var(--tawhid-bg-dark);
    line-height: 1.6;
}

/* Global Nav Bar */
.tawhid-global-nav {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--tawhid-border);
    position: sticky;
    top: 0;
    z-index: 9999;
}

.tawhid-nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.25rem;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tawhid-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.tawhid-brand .brand-badge {
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    color: #fff;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.tawhid-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tawhid-menu a {
    color: var(--tawhid-text-muted);
    text-decoration: none;
    font-size: 0.925rem;
    font-weight: 600;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.tawhid-menu a:hover,
.tawhid-menu a.active {
    color: #fff;
}

.tawhid-nav-cta {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff !important;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.tawhid-nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

/* Hero Section */
.tawhid-hero {
    position: relative;
    padding: 5rem 1.5rem 4rem;
    text-align: center;
    background: radial-gradient(circle at 50% 20%, rgba(99, 102, 241, 0.15) 0%, rgba(15, 23, 42, 0) 70%);
}

.tawhid-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.9rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #a5b4fc;
    margin-bottom: 1.5rem;
}

.tawhid-hero-title {
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin: 0 auto 1.25rem;
    max-width: 900px;
    color: #fff;
}

.tawhid-hero-title .gradient-text {
    background: linear-gradient(135deg, #a5b4fc 0%, #6366f1 50%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tawhid-hero-subtitle {
    font-size: 1.15rem;
    color: var(--tawhid-text-muted);
    max-width: 650px;
    margin: 0 auto 2.5rem;
}

/* Ajax Live Search Bar */
.tawhid-search-wrapper {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
}

.tawhid-search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: #1e293b;
    border: 2px solid #334155;
    border-radius: 14px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.tawhid-search-box:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2), 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

.tawhid-search-icon {
    padding: 0 1.25rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
}

.tawhid-ajax-search-input {
    width: 100%;
    padding: 1.1rem 0;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 1.05rem;
}

.tawhid-ajax-search-input::placeholder {
    color: #64748b;
}

.tawhid-search-kbd {
    margin-right: 1rem;
    padding: 0.25rem 0.5rem;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 6px;
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 600;
}

.tawhid-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.6);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    text-align: left;
}

/* Tools Grid & Cards */
.tawhid-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1280px;
    margin: 2.5rem auto 5rem;
    padding: 0 1.25rem;
}

.tool-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-4px);
    border-color: #6366f1;
    box-shadow: 0 12px 28px -6px rgba(99, 102, 241, 0.25);
}

.tool-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.tool-card-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #38bdf8;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.tool-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.5rem;
}

.tool-card-desc {
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.tool-card-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    color: #818cf8;
}

/* Tool Interactive Workspace */
.tool-workspace {
    max-width: 900px;
    margin: 2rem auto;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

.tool-dropzone {
    border: 2px dashed #475569;
    border-radius: 16px;
    padding: 3rem 1.5rem;
    text-align: center;
    background: rgba(15, 23, 42, 0.4);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tool-dropzone:hover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.05);
}

.tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
    text-decoration: none;
}

.tool-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.tool-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tool-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

/* Category Filter Pills */
.category-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin: 2rem auto 1rem;
    max-width: 900px;
}

.pill-btn {
    padding: 0.5rem 1.2rem;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 9999px;
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pill-btn:hover,
.pill-btn.active {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}

/* WooCommerce Dark SaaS Styling */
.woocommerce .page-title {
    color: #fff !important;
    font-size: 2.25rem !important;
    font-weight: 900 !important;
    text-align: center !important;
    margin: 3rem 0 2rem !important;
}

.woocommerce ul.products li.product {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    border-radius: 16px !important;
    padding: 1.25rem !important;
    transition: all 0.25s ease !important;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-4px) !important;
    border-color: #6366f1 !important;
    box-shadow: 0 12px 28px -6px rgba(99, 102, 241, 0.3) !important;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    color: #fff !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
}

.woocommerce ul.products li.product .price {
    color: #38bdf8 !important;
    font-weight: 800 !important;
    font-size: 1.15rem !important;
}

.woocommerce ul.products li.product .button {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    color: #fff !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
    padding: 0.6rem 1.2rem !important;
}

.woocommerce-result-count, 
.woocommerce-ordering select {
    color: #94a3b8 !important;
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    border-radius: 8px !important;
    padding: 0.4rem !important;
}

/* Responsive */
@media (max-width: 768px) {
    .tawhid-menu {
        display: none;
    }
    .tawhid-hero {
        padding: 3rem 1rem 2rem;
    }
    .tool-workspace {
        padding: 1.25rem;
        margin: 1rem;
    }
}
