/* IT Systems Help Frontend Styles */

/* Container */
.itsh-container {
    padding: 30px 0;
    width: 100%;
}

/* Grid Layout */
.itsh-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 0 auto;
}

/* Responsive Columns */
@media (min-width: 768px) {
    .itsh-container[data-columns="2"] .itsh-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .itsh-container[data-columns="3"] .itsh-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .itsh-container[data-columns="4"] .itsh-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Card Styles */
.itsh-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

.itsh-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.itsh-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.itsh-card:hover::before {
    opacity: 1;
}

/* Card Link */
.itsh-card-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 35px 25px 30px;
    text-decoration: none;
    color: inherit;
    height: 100%;
    position: relative;
    min-height: 250px;
}

.itsh-card-link:hover {
    text-decoration: none;
    color: inherit;
}

/* Icon */
.itsh-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    position: relative;
    transition: transform 0.3s ease;
}

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

.itsh-icon i {
    font-size: 36px;
    color: white;
    transition: transform 0.3s ease;
}

.itsh-card:hover .itsh-icon i {
    transform: scale(1.1);
}

/* Title */
.itsh-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #2c3e50;
    text-align: center;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.itsh-card:hover .itsh-title {
    color: #1a1a1a;
}

/* Details */
.itsh-details {
    font-size: 14px;
    line-height: 1.6;
    color: #6b7280;
    margin-bottom: 25px;
    text-align: center;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding: 0 10px;
}

/* Link Indicator */
.itsh-link-indicator {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    color: #4f46e5;
    font-weight: 500;
    padding: 8px 16px;
    background: rgba(79, 70, 229, 0.08);
    border-radius: 20px;
    transition: all 0.3s ease;
    margin-top: auto;
    white-space: nowrap;
}

.itsh-card:hover .itsh-link-indicator {
    background: rgba(79, 70, 229, 0.15);
    color: #4338ca;
    transform: translateX(3px);
}

.itsh-link-indicator i {
    font-size: 12px;
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.itsh-card:hover .itsh-link-indicator i {
    transform: translateX(3px);
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .itsh-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }
    
    .itsh-card-link {
        padding: 30px 20px 25px;
        min-height: 250px;
    }
    
    .itsh-icon {
        width: 70px;
        height: 70px;
    }
    
    .itsh-icon i {
        font-size: 32px;
    }
    
    .itsh-title {
        font-size: 18px;
    }
    
    .itsh-details {
        font-size: 13px;
        min-height: 50px;
    }
    
    .itsh-link-indicator {
        padding: 8px 18px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .itsh-container {
        padding: 20px 0;
    }
    
    .itsh-grid {
        gap: 15px;
    }
    
    .itsh-card-link {
        padding: 25px 15px 20px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .itsh-card {
        background: #1f2937;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }
    
    .itsh-card:hover {
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
    }
    
    .itsh-title {
        color: #f3f4f6;
    }
    
    .itsh-card:hover .itsh-title {
        color: #ffffff;
    }
    
    .itsh-details {
        color: #9ca3af;
    }
    
    .itsh-link-indicator {
        background: rgba(79, 70, 229, 0.2);
        color: #818cf8;
    }
    
    .itsh-card:hover .itsh-link-indicator {
        background: rgba(79, 70, 229, 0.3);
        color: #a5b4fc;
    }
}

/* Loading State */
.itsh-loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

.itsh-loading i {
    font-size: 32px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Empty State */
.itsh-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.itsh-empty i {
    font-size: 48px;
    color: #d1d5db;
    margin-bottom: 20px;
}

.itsh-empty h3 {
    font-size: 20px;
    color: #374151;
    margin-bottom: 10px;
}

/* Print Styles */
@media print {
    .itsh-card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
        page-break-inside: avoid;
    }
    
    .itsh-link-indicator {
        display: none;
    }
    
    .itsh-icon {
        box-shadow: none;
    }
}