/* ============================================================
   ARABIC DISCORD - TOOLS HUB STYLESHEET
   ============================================================ */

/* Hero Section & Background Overlay */
.tools-hero-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #050816;
}

.tools-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    opacity: 0.45;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

/* Gradient overlay that visually fades the Hero seamlessly into the tools grid */
.tools-hero-gradient {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        180deg,
        rgba(5, 8, 22, 0.5) 0%,
        rgba(5, 8, 22, 0.75) 50%,
        rgba(5, 8, 22, 0.95) 85%,
        #050816 100%
    );
    pointer-events: none;
}

/* Subtle Hero Ambient Glow */
.tools-hero-glow {
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1100px;
    height: 450px;
    background: radial-gradient(
        circle at 50% 30%,
        rgba(65, 86, 189, 0.28) 0%,
        rgba(47, 73, 255, 0.12) 45%,
        transparent 70%
    );
    filter: blur(40px);
    pointer-events: none;
    z-index: 2;
    animation: toolsGlowPulse 8s ease-in-out infinite alternate;
}

@keyframes toolsGlowPulse {
    0% { opacity: 0.7; transform: translateX(-50%) scale(0.98); }
    100% { opacity: 1; transform: translateX(-50%) scale(1.03); }
}

/* Quick Stats Bar */
.tools-stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tools-stat-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(65, 86, 189, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Search Bar Container */
.tools-search-box {
    background: rgba(11, 15, 40, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.tools-search-box:focus-within {
    border-color: rgba(102, 121, 216, 0.6);
    box-shadow: 0 0 0 4px rgba(65, 86, 189, 0.2), 0 16px 40px rgba(0, 0, 0, 0.5);
    background: rgba(11, 15, 40, 0.9);
}

/* Category Filter Chips */
.category-chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #9BA3C7;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.25s ease;
}

.category-chip:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.18);
    color: #F5F7FF;
}

.category-chip.active {
    background: #4156BD;
    border-color: #6679D8;
    color: #FFFFFF;
    box-shadow: 0 4px 20px rgba(65, 86, 189, 0.4);
}

/* Tool Card Component */
.tool-card {
    background: rgba(11, 15, 40, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 1rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s ease,
                box-shadow 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-4px);
    border-color: rgba(65, 86, 189, 0.45);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 0 25px rgba(65, 86, 189, 0.15);
}

/* Tool Card Icon Container */
.tool-icon-wrapper {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #6679D8;
    transition: all 0.3s ease;
}

.tool-card:hover .tool-icon-wrapper {
    background: rgba(65, 86, 189, 0.15);
    border-color: rgba(102, 121, 216, 0.4);
    color: #8EA2FF;
}

/* Tool Badges (Subtle & Elegant) */
.tool-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    letter-spacing: 0.02em;
}

.tool-badge-featured {
    background: rgba(65, 86, 189, 0.2);
    border: 1px solid rgba(102, 121, 216, 0.4);
    color: #A5B4FC;
}

.tool-badge-popular {
    background: rgba(234, 179, 8, 0.12);
    border: 1px solid rgba(234, 179, 8, 0.3);
    color: #FDE047;
}

.tool-badge-new {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86EFAC;
}

.tool-badge-pro {
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: #E9D5FF;
}

.tool-badge-beta {
    background: rgba(249, 115, 22, 0.12);
    border: 1px solid rgba(249, 115, 22, 0.3);
    color: #FDBA74;
}

/* Open Tool Button */
.tool-btn-primary {
    background-color: #4156BD;
    color: #FFFFFF;
    border-radius: 0.75rem;
    padding: 0.6rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
}

.tool-btn-primary:hover {
    background-color: #5268D7;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(65, 86, 189, 0.4);
}

.tool-btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #D1D5DB;
    border-radius: 0.75rem;
    padding: 0.6rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
}

.tool-btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
}

/* Empty State Container */
.tools-empty-state {
    background: rgba(11, 15, 40, 0.6);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 1.5rem;
    padding: 4rem 2rem;
    text-align: center;
}

/* Modal styling for embedded sub-tools */
.tool-modal-backdrop {
    background: rgba(5, 8, 22, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.tool-modal-content {
    background: #0B0F28;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

/* RTL Adjustments */
html[dir="rtl"] .tool-card {
    text-align: right;
}

html[dir="ltr"] .tool-card {
    text-align: left;
}

/* Smooth Focus States for Accessibility */
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 2px solid #6679D8;
    outline-offset: 2px;
}
