/* ===================================================================
   UNIFIED TOOL CARD COMPONENT
   Single source of truth for all tool cards across all pages
   No parent selectors - works everywhere
   =================================================================== */

/* Base Card Styles - Following Standard Card Guideline */
.tool-card-v2 {
    position: relative;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 16px;
    padding: 24px;
    text-decoration: none;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    aspect-ratio: 5 / 6;
    width: 100%;
}

/* Top Border on Hover */
.tool-card-v2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    opacity: 0;
    transition: opacity 0.3s;
}

.tool-card-v2:hover::before {
    opacity: 1;
}

/* Card Background Gradient */
.tool-card-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 1;
    transition: opacity 0.3s;
    pointer-events: none;
}

.tool-card-v2:hover .tool-card-background {
    opacity: 0.7;
}

/* Hover Effect */
.tool-card-v2:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1),
        0 8px 16px rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.1);
}

/* ============ CARD STRUCTURE ============ */

/* Card Header - Icon area */
.tool-card-header {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-md);
    z-index: 1;
}

.tool-header-left {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    flex: 1;
    min-width: 0;
}

/* Icon Wrapper */
.tool-icon-wrapper {
    position: relative;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-icon-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-card-v2:hover .tool-icon-bg {
    transform: scale(1.1) rotate(-5deg);
}

.tool-icon-wrapper i {
    position: relative;
    font-size: 32px;
    z-index: 1;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-card-v2:hover .tool-icon-wrapper i {
    transform: scale(1.15);
}

/* Card Title - Max 2 lines */
.tool-card-header h3 {
    font-size: 22px;
    font-weight: var(--fw-bold);
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Card Body - Description area */
.tool-card-body {
    position: relative;
    flex: 1;
    z-index: 1;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: flex-start;
}

.tool-card-body p {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Card Footer - CTA area */
.tool-card-footer {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin-top: auto;
    z-index: 1;
}

/* Arrow Button */
.tool-arrow {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary-bg);
    border-radius: var(--radius-full);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-arrow i {
    font-size: 18px;
    color: var(--text-light);
    transition: all 0.3s;
}

.tool-card-v2:hover .tool-arrow {
    background: var(--primary-color);
    transform: translateX(4px) scale(1.1);
}

.tool-card-v2:hover .tool-arrow i {
    color: white;
}

/* ============ RESPONSIVE BREAKPOINTS ============ */

/* Large Desktop (max-width: 1200px) */
@media (max-width: 1200px) {
    /* Aspect ratio handles sizing */
}

/* Desktop & Large Tablets (max-width: 992px) */
@media (max-width: 992px) {
    /* Aspect ratio handles sizing */
}

/* iPad & Medium Tablets (max-width: 900px) */
@media (max-width: 900px) {
    /* Aspect ratio handles sizing */
}

/* Tablets (max-width: 768px) */
@media (max-width: 768px) {
    /* Aspect ratio handles sizing */
}

/* Mobile Large (max-width: 640px) */
@media (max-width: 640px) {
    .tool-card-v2 {
        aspect-ratio: auto;
        /* Remove fixed aspect ratio on mobile */
        min-height: 280px;
        /* Ensure minimum height for consistency */
    }
}

/* Mobile Standard (max-width: 480px) */
@media (max-width: 480px) {
    /* Aspect ratio handles sizing */
}

/* Mobile Small (max-width: 375px) */
@media (max-width: 375px) {
    .tool-icon-wrapper {
        width: 56px;
        height: 56px;
    }

    .tool-icon-wrapper i {
        font-size: 28px;
    }

    .tool-card-header h3 {
        font-size: 20px;
    }

    .tool-card-body p {
        font-size: 16px;
    }
}