/**
 * Cards CSS - CLEANED
 * Path: public_html/css/cards.css
 * Version: 3.8.0
 * 
 * Changelog v3.6.0:
 * - Changed verified badge to logo overlay (top-right corner, Mockup B style)
 * - Added .logo-wrapper for badge positioning
 * - Removed title-based badge styles
 * 
 * Changelog v3.4.0:
 * - Fixed mobile touch issues: wrapped hover effects in @media (hover: hover)
 *   to prevent sticky hover and double-tap behavior on touch devices
 * 
 * Changelog v3.3.0:
 * - New card layout structure:
 *   - .card-top-row: Logo + Title/Subtitle/ListingType
 *   - .card-bottom-section: Tags/Categories + Pricing
 * - Added .card-header-info, .tool-subtitle styles
 * 
 * Changelog v3.2.1:
 * - Fixed .listing-type-label specificity
 * 
 * Changelog v3.1.0:
 * - FIXED: Grid layout to ensure 2 columns on desktop
 */

/* ====================================================================
   CARD GRID LAYOUT
   ==================================================================== */
.taxonomy-grid {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

/* Desktop: 2 columns */
@media screen and (min-width: 769px) {
    .taxonomy-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet: 2 columns */
@media screen and (min-width: 481px) and (max-width: 768px) {
    .taxonomy-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* Mobile: 1 column */
@media screen and (max-width: 480px) {
    .taxonomy-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* ====================================================================
   CARD STRUCTURE
   ==================================================================== */
.taxonomy-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Hover effects only for devices with hover capability (desktop) */
@media (hover: hover) {
    .taxonomy-card:hover {
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
        border-color: #007bff;
    }
}

/* Card content wrapper */
.tool-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

/* ====================================================================
   SINGLE CARD LINK SYSTEM
   ==================================================================== */
.taxonomy-card-link {
    text-decoration: none !important;
    color: inherit !important;
    display: block;
    cursor: pointer;
    height: 100%;
}

.taxonomy-card-link:hover {
    text-decoration: none !important;
    color: inherit !important;
}

.taxonomy-card-link * {
    cursor: pointer;
}

/* ====================================================================
   TOP ROW: LOGO + HEADER INFO
   ==================================================================== */
.card-top-row {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

/* Logo wrapper for verified badge positioning */
.logo-wrapper {
    position: relative;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.tool-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 12px;
    background: #f8f9fa;
    padding: 4px;
}

/* ====================================================================
   VERIFIED BADGE - Logo overlay (top-right corner)
   ==================================================================== */
.verified-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #4CAF50, #388E3C);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2.5px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.verified-badge svg {
    width: 12px;
    height: 12px;
    fill: white;
}

/* ====================================================================
   HEADER INFO
   ==================================================================== */
.card-header-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Tool title */
.taxonomy-card h3 {
    font-size: 1.2rem;
    margin: 0;
    color: #333;
    font-weight: 600;
    line-height: 1.3;
}

.tool-title-with-hover {
    transition: color 0.3s ease;
    cursor: pointer;
}

/* Title hover effect only for devices with hover capability (desktop) */
@media (hover: hover) {
    .taxonomy-card-link:hover .tool-title-with-hover {
        color: #007bff !important;
    }
}

/* Tool subtitle/description */
.tool-subtitle {
    font-size: 0.85rem;
    color: #555;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Listing type label */
.listing-type-label {
    font-size: 0.8rem;
    color: #9ca3af;
    margin: 0;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 2px;
}

.listing-type-label .svg-icon {
    vertical-align: middle;
}

/* ====================================================================
   BOTTOM SECTION: TAGS + PRICING
   ==================================================================== */
.card-bottom-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
}

.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.pricing-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* ====================================================================
   DATE ADDED
   ==================================================================== */
.date-added {
    font-size: 0.75rem;
    color: #999;
    margin: 0;
}

/* ====================================================================
   DESCRIPTION PARAGRAPH (legacy support)
   ==================================================================== */
.taxonomy-card p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    text-decoration: none !important;
}

/* ====================================================================
   RESPONSIVE DESIGN
   ==================================================================== */
@media screen and (max-width: 480px) {
    .tool-card-content {
        padding: 15px;
    }
    
    .logo-wrapper {
        width: 56px;
        height: 56px;
    }
    
    .tool-logo {
        width: 56px;
        height: 56px;
    }
    
    .verified-badge {
        width: 20px;
        height: 20px;
        top: -5px;
        right: -5px;
        border-width: 2px;
    }
    
    .verified-badge svg {
        width: 10px;
        height: 10px;
    }
    
    .taxonomy-card h3 {
        font-size: 1.1rem;
    }
    
    .tool-subtitle {
        font-size: 0.8rem;
    }
}