/* ========================================
   CAAT Information Section Styles (Copy from Resources)
   ======================================== */

.safetyhub-caat-section {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CAAT Items Grid (Copy from Resources) */
.safetyhub-caat-list,
#caat-grid {
    grid-template-columns: 1fr 1fr 1fr;
    display: grid;
    gap: 20px;
    margin-bottom: 2rem;
    transition: opacity 0.3s ease-in-out;
}

/* Responsive adjustments (Copy from Resources) */
@media (max-width: 1024px) {
    .safetyhub-caat-list,
    #caat-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .safetyhub-caat-list,
    #caat-grid {
        grid-template-columns: 1fr;
    }
}

/* CAAT Item Card (Horizontal layout) */
.safetyhub-caat-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: row;
    height: auto;
    min-height: 180px;
}

.safetyhub-caat-item:hover {
    border-color: #667eea;
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.15);
    transform: translateY(-4px);
}

/* CAAT Item Header (Horizontal icon section) */
.safetyhub-caat-header-card {
    width: 180px;
    min-width: 180px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.safetyhub-caat-header-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%);
}

/* CAAT Item Content (Horizontal layout) */
.safetyhub-caat-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: center;
}

/* Mobile responsive - switch back to vertical */
@media (max-width: 767px) {
    .safetyhub-caat-item {
        flex-direction: column;
        height: 100%;
        min-height: auto;
    }
    
    .safetyhub-caat-header-card {
        width: 100%;
        min-width: auto;
        height: 8rem;
    }
}

.safetyhub-caat-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
    word-break: break-word;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.safetyhub-caat-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
    word-break: break-word;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* CAAT Button (Course-style) */
.safetyhub-caat-button {
    margin-top: auto;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.safetyhub-caat-button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
    color: white;
    text-decoration: none;
}

.safetyhub-caat-button:active {
    transform: scale(0.98);
}

.safetyhub-caat-button i {
    width: 1rem;
    height: 1rem;
}

/* Empty State */
.safetyhub-caat-empty {
    text-align: center;
    padding: 3rem 2rem;
}

.safetyhub-caat-empty h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.safetyhub-caat-empty p {
    color: #6b7280;
    margin: 0;
}

/* Loading State */
.safetyhub-caat-loading {
    text-align: center;
    padding: 3rem 2rem;
}

.safetyhub-caat-loading .animate-spin {
    width: 2rem;
    height: 2rem;
    border: 3px solid #e5e7eb;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

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

.safetyhub-caat-loading p {
    color: #6b7280;
    margin: 0;
}

/* Pagination Styling */
.safetyhub-pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-number,
.pagination-prev,
.pagination-next {
    padding: 0.5rem 0.75rem;
    border: none;
    background: white;
    color: #6b7280;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    font-weight: 500;
    min-width: 2.5rem;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-number:hover:not(.active) {
    background: #f1f5f9;
    color: #475569;
}

.pagination-number.active {
    background: linear-gradient(135deg, #DE007D 0%, #F05A28 100%);
    color: white;
    border: none;
    font-weight: 600;
}

.pagination-prev,
.pagination-next {
    min-width: auto;
    padding: 0.5rem;
}

.pagination-prev:hover,
.pagination-next:hover {
    background: #f1f5f9;
    color: #DE007D;
}

.pagination-prev i,
.pagination-next i {
    width: 1rem;
    height: 1rem;
}

.pagination-dots {
    color: #9ca3af;
    padding: 0 0.25rem;
}

/* Category Pills */
.caat-category-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.caat-category-pill:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

.caat-category-pill.active {
    background: linear-gradient(to right, #DE007D, #F05A28);
    color: white;
    border-color: transparent;
}

/* CAAT Card (Copy from Resources) */
.caat-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.caat-card:hover {
    box-shadow: 0 8px 20px -2px rgba(233, 30, 140, 0.2);
    border-color: #E879B6;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive Typography */
@media (max-width: 640px) {
    .safetyhub-caat-header-card {
        height: 6rem;
        font-size: 2.5rem;
    }

    .safetyhub-caat-title {
        font-size: 1rem;
    }

    .safetyhub-caat-subtitle {
        font-size: 0.8rem;
    }
    
    .caat-title {
        font-size: 1rem;
    }

    .caat-subtitle {
        font-size: 0.8rem;
    }
}
