/**
 * Douana Tools Hub - Frontend Styles
 * Modern, responsive styling for tool displays
 */

:root {
    --dth-primary: #e91e63;
    --dth-secondary: #2196f3;
    --dth-gradient-start: #e91e63;
    --dth-gradient-end: #2196f3;
    --dth-border-radius: 12px;
    --dth-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --dth-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --dth-shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* ========================================
   GRID LAYOUT - Card Style
   ======================================== */

.dth-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.dth-tool-card {
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.1) 0%, rgba(33, 150, 243, 0.1) 100%);
    border-radius: var(--dth-border-radius);
    overflow: hidden;
    transition: var(--dth-transition);
    box-shadow: var(--dth-shadow);
    position: relative;
}

.dth-tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--dth-gradient-start) 0%, var(--dth-gradient-end) 100%);
    opacity: 0;
    transition: var(--dth-transition);
    z-index: 0;
}

.dth-tool-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--dth-shadow-hover);
}

.dth-tool-card:hover::before {
    opacity: 0.05;
}

.dth-tool-link {
    display: block;
    padding: 32px 24px;
    text-decoration: none;
    color: inherit;
    position: relative;
    z-index: 1;
}

.dth-tool-icon {
    text-align: center;
    margin-bottom: 20px;
}

.dth-icon-emoji {
    font-size: 48px;
    line-height: 1;
    display: inline-block;
    transition: var(--dth-transition);
}

.dth-tool-card:hover .dth-icon-emoji {
    transform: scale(1.1);
}

.dth-tool-icon img {
    max-width: 80px;
    height: auto;
    border-radius: 8px;
}

.dth-tool-content {
    text-align: center;
}

.dth-tool-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #1a1a1a;
    line-height: 1.3;
}

.dth-tool-description {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin: 0;
}

.dth-tool-stats {
    margin-top: 16px;
    font-size: 12px;
    color: #999;
}

.dth-stats-number {
    font-weight: 600;
    color: var(--dth-primary);
}

/* ========================================
   TAGS LAYOUT - Sidebar Style
   ======================================== */

.dth-tools-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
}

.dth-tool-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    transition: var(--dth-transition);
    position: relative;
    overflow: hidden;
}

.dth-tool-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--dth-primary);
    opacity: 0;
    transition: var(--dth-transition);
    z-index: 0;
}

.dth-tool-tag:hover {
    border-color: var(--dth-primary);
    transform: translateX(4px);
}

.dth-tool-tag:hover::before {
    opacity: 0.1;
}

.dth-tool-tag:hover {
    color: var(--dth-primary);
}

.dth-tag-title,
.dth-tag-count,
.dth-tag-icon {
    position: relative;
    z-index: 1;
}

.dth-tag-count {
    color: #999;
    font-size: 13px;
}

.dth-tool-tag:hover .dth-tag-count {
    color: var(--dth-primary);
}

.dth-tag-icon {
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    opacity: 0.5;
    transition: var(--dth-transition);
}

.dth-tool-tag:hover .dth-tag-icon {
    opacity: 1;
    transform: rotate(90deg);
}

/* ========================================
   LIST LAYOUT - Compact Style
   ======================================== */

.dth-tools-list {
    margin: 24px 0;
}

.dth-tool-item {
    margin-bottom: 16px;
}

.dth-tool-item-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: var(--dth-transition);
}

.dth-tool-item-link:hover {
    border-color: var(--dth-primary);
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.1);
    transform: translateX(4px);
}

.dth-item-icon {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
}

.dth-item-content {
    flex: 1;
}

.dth-item-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #1a1a1a;
}

.dth-item-description {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

.dth-item-arrow {
    font-size: 20px;
    color: #ccc;
    flex-shrink: 0;
    transition: var(--dth-transition);
}

.dth-tool-item-link:hover .dth-item-arrow {
    color: var(--dth-primary);
    transform: translateX(4px);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .dth-tools-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .dth-tool-card {
        margin-bottom: 0;
    }
    
    .dth-tools-tags {
        gap: 8px;
    }
    
    .dth-tool-tag {
        font-size: 13px;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .dth-tool-link {
        padding: 24px 16px;
    }
    
    .dth-icon-emoji {
        font-size: 40px;
    }
    
    .dth-tool-title {
        font-size: 18px;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.dth-tool-link:focus,
.dth-tool-tag:focus,
.dth-tool-item-link:focus {
    outline: 2px solid var(--dth-primary);
    outline-offset: 2px;
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .dth-tool-card,
    .dth-tool-tag,
    .dth-tool-item-link {
        break-inside: avoid;
    }
}

